package com.pet.entity;

import java.io.Serializable;
import java.time.LocalDateTime;

import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;

/**
 * 
 * @TableName pet_rescue
 */
@Data
@TableName("pet_rescue")
public class PetRescue implements Serializable {
    /**
     *  宠物救助id
     */
    @TableId(value = "rescue_id",type = IdType.AUTO)//在自增主键的变量加上即可
    private Integer rescue_id;

    /**
     * 情况描述
     */
    private String detail;

    /**
     * 现场照片
     */
    private String image;

    /**
     * 地点
     */
    private String location;

    /**
     * 发现时间
     */
    private LocalDateTime find_time;

    /**
     * 联系人
     */
    private String contacts;

    /**
     * 联系方式
     */
    private String phone;

    /**
     * 解决状态：0未解决，1已解决
     */
    private Integer status;

    /**
     * 删除状态：0未删除，1已删除
     */
    @TableLogic
    @TableField(fill = FieldFill.INSERT)
    private Integer is_delete;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        PetRescue other = (PetRescue) that;
        return (this.getRescue_id() == null ? other.getRescue_id() == null : this.getRescue_id().equals(other.getRescue_id()))
            && (this.getDetail() == null ? other.getDetail() == null : this.getDetail().equals(other.getDetail()))
            && (this.getImage() == null ? other.getImage() == null : this.getImage().equals(other.getImage()))
            && (this.getLocation() == null ? other.getLocation() == null : this.getLocation().equals(other.getLocation()))
            && (this.getFind_time() == null ? other.getFind_time() == null : this.getFind_time().equals(other.getFind_time()))
            && (this.getContacts() == null ? other.getContacts() == null : this.getContacts().equals(other.getContacts()))
            && (this.getPhone() == null ? other.getPhone() == null : this.getPhone().equals(other.getPhone()))
            && (this.getStatus() == null ? other.getStatus() == null : this.getStatus().equals(other.getStatus()))
            && (this.getIs_delete() == null ? other.getIs_delete() == null : this.getIs_delete().equals(other.getIs_delete()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRescue_id() == null) ? 0 : getRescue_id().hashCode());
        result = prime * result + ((getDetail() == null) ? 0 : getDetail().hashCode());
        result = prime * result + ((getImage() == null) ? 0 : getImage().hashCode());
        result = prime * result + ((getLocation() == null) ? 0 : getLocation().hashCode());
        result = prime * result + ((getFind_time() == null) ? 0 : getFind_time().hashCode());
        result = prime * result + ((getContacts() == null) ? 0 : getContacts().hashCode());
        result = prime * result + ((getPhone() == null) ? 0 : getPhone().hashCode());
        result = prime * result + ((getStatus() == null) ? 0 : getStatus().hashCode());
        result = prime * result + ((getIs_delete() == null) ? 0 : getIs_delete().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", rescue_id=").append(rescue_id);
        sb.append(", detail=").append(detail);
        sb.append(", image=").append(image);
        sb.append(", location=").append(location);
        sb.append(", find_time=").append(find_time);
        sb.append(", contacts=").append(contacts);
        sb.append(", phone=").append(phone);
        sb.append(", status=").append(status);
        sb.append(", is_delete=").append(is_delete);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}